//
//  ST_BaseNetModel.m
//  ST_BaseMall
//
//  Created by 昱胜 on 2022/9/2.
//

#import "ST_BaseNetModel.h"

@implementation ST_BaseNetModel


+ (NSDictionary<NSString *,id> *)modelCustomPropertyMapper {
    return @{@"msg" : @[@"message"],
             @"resultset":@[@"data",@"rows"],
             @"code":@[@"code"],
             @"total":@[@"total"]
    };
}

+ (instancetype)successModel:(id)response urlString:(NSString *)urlString params:(NSDictionary * __nullable)params {
    ST_BaseNetModel * model = [ST_BaseNetModel yy_modelWithDictionary:response];
    model.allResultData = response;
    model.requestUrl = urlString;
    model.params = params;
    
//    if(model.code == 200)
//    {
        NSLog(@"%@\n%@\n%@\n%@\n",urlString,params,model.allResultData,[model.resultset yy_modelToJSONString]);
//    }
    return model;
}


@end
